package com.scott.ch01.student.service.impl;

import com.scott.ch01.student.bean.StudentBean;
import com.scott.ch01.student.dao.StudentDao;
import com.scott.ch01.student.service.StudentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * @author 黄后林
 * @version 1.0
 * @note
 * @date 2021-11-23 21:51:33
 */
@Service
public class StudentServiceImpl implements StudentService {

    @Autowired
    private StudentDao dao;

    @Transactional
    @Override
    public int addStudent(StudentBean student) {
        int counter= dao.addStudent(student);
        System.out.println(10/0);
        return counter;
    }
}
